<?php
class Member_model extends General_db_model
{
	private $tbl_member = 'tbl_members';
        function total_members()
	{
		return $this->countTotal($this->tbl_member);
	}

	function get_members($limit=NULL, $start=NULL)
	{
		$this->db->select('*');
		$query = $this->db->get($this->tbl_member, $limit, $start);
		return $query->result();
	}
        function get_member_list(){
            $members = $this->get_members();
            foreach($members as $member){
                //echo "<pre>"; print_r($member);exit;
                $member_id = $member->id;
                $member_name = $member->first_name." ".$member->last_name;
                $data[$member_id] = $member_id." ($member_name)";
            }
            return $data;
        }
         function check_email($keyword){
            $this->db->select('id, email');
            $where = $this->db->where('email',$keyword);
            $query = $this->db->get($this->tbl_member);
            $result = $query->result_array();
            return $result;//debug_array($result);exit;
        }
}
?>